﻿using System;
using System.Collections.Generic;
using System.Dynamic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using MongoDB.Bson;

namespace MongoDBEmbeddedOperation
{
    /// <summary>
    /// 传感器节点
    /// </summary>
    public class SensorNode
    {
        /// <summary>
        /// ID
        /// </summary>
        public ObjectId Id { get; set; }

        /// <summary>
        /// 记录数
        /// </summary>
        public List<Record> Records { get; set; }
    }

    /// <summary>
    /// 数据记录
    /// </summary>
    public class Record
    {
        /// <summary>
        /// 数据值
        /// </summary>
        public double Data { get; set; }

        /// <summary>
        /// 记录时间
        /// </summary>
        public DateTime RecorDateTime { get; set; }
    }
}
